package dao;

import util.DBHelper;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class IWeekArrangeIDMemoryDAO {
	
	
	public int increaseIWeekArrangeID(Statement statement) throws SQLException {
		ResultSet rs;
		
		int nIWeekArrangeID = 0;
		rs = statement.executeQuery("select * from iweekarrangeidmemory");
		rs.next();
		nIWeekArrangeID = rs.getInt(1);
	
		statement.execute("update iweekarrangeidmemory set IWeekArrangeID=IWeekArrangeID+1");
		
		rs.close();
		return nIWeekArrangeID;
	}
}
